home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Online / Epic4 / share / epic / help / 6_functions / delitem < prev    next >
Text File  |  2001-03-21  |  957b  |  29 lines

  1. Synopsis:
  2.    $delitem(<array> <item#>)
  3.  
  4. Technical:
  5.    This function is used to delete an entry from an array created with
  6.    $setitem().  If the item deleted is the only one present in the array,
  7.    the array is deleted too.  If the item is not the last item in the
  8.    array, all items beyond it (with higher item numbers) are shifted down
  9.    by one to fill in the gap.
  10.  
  11. Practical:
  12.    This function is used to delete items from an array.  The uses for this
  13.    are pretty obvious.  If you add items to an array, it follows that you
  14.    might want to remove them, too.
  15.  
  16. Returns:
  17.    -2   if the item does not exist in the array
  18.    -1   if the array does not exist
  19.     0   on success
  20.  
  21. Examples:
  22.    $delitem(array 2)             deletes item 2 from array "array"
  23.    $delitem(fake_array 4)        error, "fake_array_ does not exist
  24.    $delitem(array -2)            error, item -2 does not exist
  25.  
  26. See Also:
  27.    Arrays(7); getitem(6); setitem(6)
  28.  
  29.